<template>
  <!-- 辅助检查报告 -->
  <section>
    <el-tabs v-if="tableList.length >0" v-model="tabName" type="border-card">
      <template v-for="(item,index) in tableList">
        <el-tab-pane :key="index" :name="'t'+index">
          <template v-slot:label>
            <div class="title-report overflow-omit">{{item.name}}</div>
          </template>
          <assistReportDetail :dataItem="item"></assistReportDetail>
        </el-tab-pane>
      </template>
    </el-tabs>
    <div v-if="tableList.length == 0" style="color:#999;padding:10px 0;text-align:center;">
      <i class="iconfont iconwushuju" style="font-size:40px;"></i>
      <div>暂无数据</div>
    </div>
  </section>
</template>
<script>
export default {
  props: ["cureId"],
  components: {
    assistReportDetail: () => import("./assistReportDetail.vue")
  },
  data() {
    return {
      tabName: "t0",
      tableList: []
    };
  },
  mounted() {
    const th = this;
    th.getData();
  },
  methods: {
    getData() {
      const th = this;
      let j = {
        cureId: th.cureId
      };
      th.$api.getCureAssistCureId(j).then(res => {
        if (res.executed) {
          th.tableList = res.data;
        }
      });
    }
  }
};
</script>
<style lang="scss" scoped>
.title-report {
  display: inline-block;
  max-width: 200px;
}
/deep/.image-box {
  margin: 0;
  padding: 0;
  li {
    list-style: none;
    margin-right: 15px;
    margin-bottom: 15px;
    .report-image {
      width: 100%;
      height: 100%;
      display: block;
    }
  }
  &::after {
    content: "";
    display: block;
    clear: both;
  }
}
</style>